package com.example.InnerClass;

public class Test2Innerclass {
    public static void main(String[] args) {
        Outer1 o = new Outer1();
        o.method();

        Outer2.Inner oi = new Outer2.Inner();
        oi.show();
        oi.method();        //Inner.method
        Outer2.Inner.method();     //Inner.method
    }
}

class Outer1 {
    private class Inner {
        public void show() {
            System.out.println("inner..show");
        }
    }

    public void method() {
        Inner i = new Inner();
        i.show();
    }
}

class Outer2 {
    static class Inner {
        public void show() {
            System.out.println("Inner....show");
        }
        public static void method(){
            System.out.println("Inner.method");
        }
    }
}